<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title></title><link href="__TMPL__Static/Css/style.css" rel="stylesheet" /><script type="text/javascript" src="__TMPL__Static/Js/jquery.js"></script><script type="text/javascript" src="__TMPL__Static/Js/base.js"></script><script type="text/javascript" src="__TMPL__Static/Js/json.js"></script><script type="text/javascript" src="__TMPL__Static/Js/jquery.pngFix.js"></script><link href="__TMPL__Static/Css/tooltip.css" rel="stylesheet" /><script type="text/javascript" src="__TMPL__Static/Js/jquery.tooltip.js"></script><script type="text/javascript"><!--
//指定当前组模块URL地址 
var URL = '__URL__';
var ROOT_PATH = '__ROOT__';
var APP	 =	 '__APP__';
var STATIC = '__TMPL__Static';
var VAR_MODULE = '<?php echo c('VAR_MODULE');?>';
var VAR_ACTION = '<?php echo c('VAR_ACTION');?>';
var CURR_MODULE = '<?php echo ($module_name); ?>';
var CURR_ACTION = '<?php echo ($action_name); ?>';

//定义JS中使用的语言变量
var CONFIRM_DELETE = '<?php echo (L("CONFIRM_DELETE")); ?>';
var AJAX_LOADING = '<?php echo (L("AJAX_LOADING")); ?>';
var AJAX_ERROR = '<?php echo (L("AJAX_ERROR")); ?>';
var ALREADY_REMOVE = '<?php echo (L("ALREADY_REMOVE")); ?>';
var SEARCH_LOADING = '<?php echo (L("SEARCH_LOADING")); ?>';
var CLICK_EDIT_CONTENT = '<?php echo (L("CLICK_EDIT_CONTENT")); ?>';
//--></script></head><body><div class="fanwe-body"><div class="fb-title"><div><p><span><?php echo ($ur_href); ?></span></p></div></div><div class="fb-body"><table class="body-table" cellpadding="0" cellspacing="1" border="0"><tr><td class="body-table-td"><div class="body-table-div"><script type="text/javascript" src="__TMPL__Static/Js/dataList.js"></script><div class="handle-btns"><div class="img-button "><p><input type="button" id="editShare" name="editShare" value="<?php echo (L("EDIT")); ?>" onclick="editData(this,'checkList','share_id')" class="editShare"></p></div><div class="img-button "><p><input type="button" id="removeShare" name="removeShare" value="<?php echo (L("REMOVE")); ?>" onclick="removeData(this,'checkList')" class="removeShare"></p></div><div class="img-button "><p><input type="button" id="BatchDelete" name="BatchDelete" value="<?php echo (L("BATCH_DELETE")); ?>" onclick="BatchDelete()" class="BatchDelete"></p></div><div class="link-button " style=""><p><a id="" name="" href="<?php echo U('Share/look',array('is_best'=>1));?>" class=""><?php echo (L("LOOK_BEST_ALL")); ?></a></p></div><form action="__APP__"><span><?php echo (L("SHARE_CONTENT")); ?></span><input class="textinput" type="text" value="<?php echo ($keyword); ?>" name="keyword" size="12" /><small></small><span><?php echo (L("USER_NAME")); ?></span><input class="textinput" type="text" value="<?php echo ($uname); ?>" name="uname" id="user_name" size="8" /><small></small><input class="submit_btn" type="submit" value="<?php echo (L("SEARCH")); ?>" /><input type="hidden" name="<?php echo c('VAR_MODULE');?>" value="<?php echo ($module_name); ?>" /><input type="hidden" name="<?php echo c('VAR_ACTION');?>" value="look" /></form></div><table id="checkList" class="table-list list" cellpadding="0" cellspacing="0" border="0"><thead><tr><th width="26" class="first"><input type="checkbox" onclick="checkAll('checkList')"></th><th width="80"><a href="javascript:sortBy('share_id','','check')"><?php echo (L("ID")); ?></a></th><th><?php echo (L("SHARE_CATEGORY")); ?></th><th><?php echo (L("USER_NAME")); ?></th><th><?php echo (L("COLOR")); ?></th><th width="130"><?php echo (L("CREATE_TIME")); ?></th><th width="60"><?php echo (L("COLLECT_COUNT")); ?></th><th width="60"><?php echo (L("RELAY_COUNT")); ?></th><th><?php echo (L("COMMENT_COUNT")); ?></th><th width="70"><?php echo (L("LOOK_BEST")); ?></th><th width="40"><?php echo (L("STATUS")); ?></th><th width="80"><?php echo (L("SORT")); ?></th><th width="80"><?php echo (L("HANDLE")); ?></th></tr></thead><?php
 $index = -1; ?><tbody><?php if(is_array($list)): foreach($list as $key=>$item): $index++; $row_count = ' rowspan="3"'; if($index % 2 == 0) $tr_class = ' class="tr'.$item['share_id'].'"'; else $tr_class = ' class="tr'.$item['share_id'].' even"'; $item['tags'] = ''; if(isset($item['cache_data']['tags']) && isset($item['cache_data']['tags']['user'])) { $item['tags'] = array(); foreach($item['cache_data']['tags']['user'] as $tag) { $item['tags'][] = $tag['tag_name']; } $item['tags'] = implode("，",$item['tags']); } ?><tr<?php echo ($tr_class); ?>><td class="first"<?php echo ($row_count); ?>><input type="checkbox" name="key" value="<?php echo ($item["share_id"]); ?>"></td><td <?php echo ($row_count); ?>><?php echo ($item["share_id"]); ?></td><td><?php echo ($item["cate_name"]); ?></td><td><?php echo ($item["user_name"]); ?></td><td><?php echo ($item["color_name"]); ?></td><td><?php echo toDate($item['create_time']);?></td><td><?php echo ($item["relay_count"]); ?></td><td><?php echo ($item["collect_count"]); ?></td><td><?php echo getCommentCount($item['comment_count'],$item['share_id']);?></td><td><span class="pointer" module="Share" href="javascript:;" onclick="toggleStatus(this,'<?php echo ($item["share_id"]); ?>','is_look_best')"><?php echo getStatusImg($item['is_look_best']);?></span></td><td><span class="pointer" module="Share" href="javascript:;" onclick="toggleStatus(this,'<?php echo ($item["share_id"]); ?>','status')"><?php echo getStatusImg($item['status']);?></span></td><td><span class="pointer" module="Share" href="javascript:;" onclick="numberEdit(this,'<?php echo ($item["share_id"]); ?>','sort')"><?php echo ($item["sort"]); ?></span></td><td<?php echo ($row_count); ?>><a href="javascript:;" onclick="editData(this,'<?php echo ($item["share_id"]); ?>','share_id')"><?php echo (L("EDIT")); ?></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:;" onclick="removeData(this,'<?php echo ($item["share_id"]); ?>','share_id')"><?php echo (L("REMOVE")); ?></a></td></tr><tr<?php echo ($tr_class); ?> align="left"><td colspan="4" class="torder"><?php if(is_array($item['cache_data']['imgs']['all'])): foreach($item['cache_data']['imgs']['all'] as $key=>$img): ?><a href="<?php echo adminFormatImgById($img['img_id']);?>" target="_blank"><img class="imgTooltip" title="<img src='<?php echo adminFormatImgById($img['img_id']);?>' height='200' />" src="<?php echo adminFormatImgById($img['img_id'],100,100);?>" height="30" style="border:solid 1px #ccc;" /></a><?php endforeach; endif; ?></td><td colspan="6" class="torder"><?php echo (L("SHARE_TAGS")); ?>：<?php echo ($item["tags"]); ?></td></tr><tr<?php echo ($tr_class); ?> align="left"><td colspan="10" class="torder"><?php echo (L("SHARE_CONTENT")); ?>：<?php echo ($item["content"]); ?></td></tr><?php endforeach; endif; ?></tbody></table><div class="pager"><?php echo ($page); ?></div></div></td></tr></table></div></div><div class="ajax-loading"></div></body><script type="text/javascript">jQuery(function($){
	updateBodyDivHeight();
	$(window).resize(function(){
		updateBodyDivHeight();
	});
	$('.imgTooltip').poshytip();
});

function updateBodyDivHeight()
{
	jQuery(".body-table-div").height(jQuery(".fanwe-body").height() - 36);
	if(jQuery(".body-table-div").get(0).scrollHeight > jQuery(".body-table-div").height())
	{
		var width = jQuery(".body-table-div").width() - 16;
		jQuery(".body-table-div > *").each(function(){
			if(!$(this).hasClass('ajax-loading'))
			{
				$(this).width(width)	
			}
		});
	}
}
</script></html>